package com.maixun.lib_network.interceptor

import com.maixun.lib_network.base.INetworkRequiredInfo
import okhttp3.Interceptor
import okhttp3.Response

/**
 * 作者：Lmoumou
 * 时间：2020/7/8 10:47
 */
class CommonRequestInterceptor(private val requiredInfo: INetworkRequiredInfo) : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val builder = chain.request().newBuilder()
        builder.addHeader("uevs", "1-${requiredInfo.getAppVersionCode()}")
        return chain.proceed(builder.build())
    }
}